<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>数组的分隔</title>
</head>
<body>
    <script>
        // 将字符串数组用|或其他符号分割
        // 求一个字符串  aa|bb|cc|ee
        var arr = ["aa", "bb", "cc","dd","ee"];
        var str = array[0]; // 取出数组的第一项aa
        //分隔符
        var seperator = "|";
        for (var i = 1; i < arr.length; i++) {
            str += seperator + arr[i];
         }
         console.log(str) // 分隔之后的数组
    </script>
    </script>
</body>
</html>